package com.vf.admin.fiwork.dto;



// 金豆排序  工具类
public class SortDto implements Comparable<SortDto>{
    // 用户ID
    private Integer id;
    // 用户姓名
    private String userName;
    // 收礼/送礼 总额
    private Integer countQuantity;
    //头像
    private String pic;

    public SortDto(){
        super();
    }
    public SortDto(Integer id,String userName,Integer countJinDou,String pic){
        super();
        this.id =id;
        this.userName =userName;
        this.countQuantity = countJinDou;
        this.pic = pic;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getCountQuantity() {
        return countQuantity;
    }

    public void setCountQuantity(Integer countQuantity) {
        this.countQuantity = countQuantity;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    @Override
    public int compareTo(SortDto o) {
        if(this.countQuantity != o.countQuantity){
            return this.countQuantity - o.countQuantity;
        }else {
            return this.userName.compareTo(o.userName);
        }
    }
}
